﻿using _07_03Mvvm模式.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _07_03Mvvm模式.ViewModels
{
	public class ViewModel
	{
		public AddModel addModel { get; set; } = new AddModel();

		public Command myCommand { get; set; }

		public ViewModel()
		{
			myCommand = new Command();
			myCommand.action = Add;
		}

		public void Add()
		{
			addModel.Value3=addModel.Value1 + addModel.Value2;
		}
	}
}
